{% load staticfiles %}
{% load r_extra %}
<div class="r-reply">
    <form class="ui reply form" action="" method="post">
        <div class="field">
            <input type="hidden" class="review-id" value="{{ review.id }}"/>
            <input type="hidden" class="r_user-id" value="{{ request.user.id }}">
            <label>
                <textarea class="comment-content" style="background-color: rgb(246, 244, 236);"
                          data-toggle="popover"
                          data-placement="bottom"
                          data-content="评论内容不允许为空or大于100字"></textarea>
            </label>
        </div>
        <div class="ui labeled submit icon button">
            <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
            <input type="button" class="btn btn-primary" id="review-reply" value="Add Reply">
        </div>
    </form>
</div>

<div class="ui minimal comments">
    <h3 class="ui dividing header">Comments</h3>
    <input type="button" class="ui dividing header button" id="add-film-comment">
    {% for comment in comments %}
        <div class="comment">
            <a class="avatar">
                <img src="/media/{% auto_print comment "avatar" %}">
            </a>
            <div class="content">
                <a class="author">{% auto_print comment "name" %}</a>
                <div class="metadata">
                <span class="date">
                    {% auto_print comment "timestamp" %}
                </span></div>
                <div class="text">{% auto_print comment "content" %}</div>
                <div class="actions">
                    <span class="comment-id" style="display: none;">{{ comment.id }}</span>
                </div>
            </div>
        </div>
    {% endfor %}
</div>
